array (10) Int myArray
array (10) Int myBackwardsArray
Int position
Int aux
Int i
Int j

forall i (0, 10) {
   myArray.add(i)
}

print("Original array\n", myArray)

for (i = 9; i >= 0; i -= 1) {
   position = myBackwardsArray.size()
   myBackwardsArray[position] = myArray[i]
}

print("Original array sorted backwards\n", myBackwardsArray)

position = 9 //last position
forall i (0, 10) {
   forall j (0, 10) {
       aux = myArray[j]
       myArray[j] = myArray[9]
       myArray[9] = aux
   }
}

print ("Still sorted\n", myArray)
